logical c programming questions